from PIL import Image
import numpy as np
def print_img_pixel(path):
    img = Image.open(path)
    gt = np.array(img.convert('L'))
    gt = np.array(gt, dtype=np.float32)
    img.show()
    print("Image shape is {}".format(gt.shape))


if __name__ == '__main__':
    print_img_pixel("data/train_mask/2092.png")